<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Controller
 *
 * @author 耿鸿飞 <eoe2005@gmail.com>
 */
class Controller {
    public $_vars = array();
    public function set(String $name,$obj){
        $this->_vars[$name] = $obj;
    }
    public function get(String $k,$def = ''){
        if(isset($_GET[$k])){
            return $_GET[$k];
        }
        return $def;
    }
    public function post(String $k,$def = ''){
        if(isset($_POST[$k])){
            return $_POST[$k];
        }
        return $def;
    }
    public function ispost(){
        if(isset($_SERVER['REQUEST_METHOD'])){
            return $_SERVER['REQUEST_METHOD'] == 'POST';
        }
        return false;
    }
    
    public function ajax(){
        
    }
    public function display($file){
        
    }
}

?>
